<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/docs.css" type="text/css" rel="stylesheet" />
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script src="../js/prettify.js" type="text/javascript"></script>
</head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
<div id="api-info-block">
    <div class="api-level">H3C CAS云管理平台</div>
  </div>
  <div id="jd-header">
    <h1>修改虚拟机基本概要信息</h1>
  </div>
</div>
<div id="jd-content">
<div class="jd-descr">
<p>修改虚拟机基本概要信息。</p>
<h2><a name="uri"></a>接口 URI</h2>
<p>/cas/casrs/vm/modify</p>
<h2><a name="access"></a>访问方法</h2>
<dl>
  <dt><b>HTTP 方法</b></dt>
  <dd>PUT</dd>
  <dt><b>消息体</b></dt>
  <div class="source">
  	<pre class="prettyprint lang-xml">&lt;domain&gt;<br>    &lt;id&gt;6&lt;/id&gt;<br>    &lt;name&gt;test&lt;/name&gt;<br>    &lt;title&gt;test&lt;/title&gt;<br>    &lt;basic&gt;<br>        &lt;pae&gt;0&lt;/pae&gt;<br>        &lt;acpi&gt;0&lt;/acpi&gt;<br>        &lt;apic&gt;0&lt;/apic&gt;<br>        &lt;clock&gt;utc&lt;/clock&gt;<br>        &lt;blkiotune&gt;300&lt;/blkiotune&gt;<br>        &lt;startPriority&gt;0&lt;/startPriority&gt;<br>        &lt;autoMigrate&gt;0&lt;/autoMigrate&gt;<br>        &lt;desc&gt;test rest modify domain&lt;/desc&gt;<br>        &lt;osha&gt;1&lt;/osha&gt;<br>        &lt;timeSync&gt;1&lt;/timeSync&gt;<br>        &lt;haManage&gt;0&lt;/haManage&gt;<br>    &lt;/basic&gt;<br>&lt;/domain&gt;</pre>
  </div>
</dl>

<dt><a name="detail"></a><b>元素含义</b></dt>
  <table id="pubmethods" class="jd-sumtable">
    <tbody>
      <tr>
        <th colspan="2"><span class="prettyprint lang-xml">domain</span>各子元素</th>
      </tr>
	  <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
        <td class="jd-linkcol"><span class="sympad">虚拟机id。</span>
          <div class="jd-descrdiv">长整型（Long）类型，必须。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
        <td width="100%" class="jd-linkcol"><span class="sympad">虚拟机名称。</span>
          <div class="jd-descrdiv">字符串（String）类型，必须。</div></td>
      </tr>
      <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">title</span></td>
        <td class="jd-linkcol"><span class="sympad">虚拟机显示名称。</span>
          <div class="jd-descrdiv">字符串（String）类型，必须。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">basic</span></td>
        <td class="jd-linkcol"><span class="sympad">虚拟机概要信息。</span>
          <div class="jd-descrdiv">自定义类型，必须。</div></td>
      </tr>
    </table>
	<table id="pubmethods" class="jd-sumtable">
    <tbody>
      <tr>
        <th colspan="2">basic各子元素</th>
      </tr>
      
      <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">pae</span></td>
        <td width="100%" class="jd-linkcol"><span class="sympad">是否开启PAE，枚举值，1：开启，0：不开启。</span>
          <div class="jd-descrdiv">整型（Integer）类型，必须。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">acpi</span></td>
        <td class="jd-linkcol"><span class="sympad">是否开启ACPI，枚举值，1：开启，0：不开启。</span>
          <div class="jd-descrdiv">整型（Integer）类型，必须。</div></td>
      </tr>
	   <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">apic</span></td>
        <td class="jd-linkcol"><span class="sympad">是否开启APIC，枚举值，1：开启，0：不开启。</span>
          <div class="jd-descrdiv">整型（Integer）类型，必须。</div></td>
      </tr>
	   <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">clock</span></td>
        <td class="jd-linkcol"><span class="sympad">时钟设置，枚举值：utc：世界时钟，localtime：本地时钟。</span>
          <div class="jd-descrdiv">字符串（String）类型，必须。</div></td>
      </tr>
	   <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">blkiotune</span></td>
        <td class="jd-linkcol"><span class="sympad">I/O优先级，枚举值：500：高，300：中，200：低。</span>
          <div class="jd-descrdiv">整型（Integer）类型，必须。</div></td>
      </tr>
	   <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">startPriority</span></td>
        <td class="jd-linkcol"><span class="sympad">启动优先级，当集群启用HA后有效，枚举值：0：低级，1：中级，2：高级。</span>
          <div class="jd-descrdiv">整型（Integer）类型，必须。</div></td>
      </tr>
	   <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">autoMigrate</span></td>
        <td class="jd-linkcol"><span class="sympad">是否允许虚拟机自动迁移，实现资源动态调整，枚举值：1=允许，0=不允许。</span>
          <div class="jd-descrdiv">整型（Integer）类型，必须。</div></td>
      </tr>
	   <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">desc</span></td>
        <td class="jd-linkcol"><span class="sympad">描述,最大输入长度为120个字符。</span>
          <div class="jd-descrdiv">字符串（String）类型，可选项。</div></td>
      </tr>
	  <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">osha</span></td>
        <td class="jd-linkcol"><span class="sympad">系统故障策略 0:不处理 1:故障重启 2:故障迁移。 </span>
          <div class="jd-descrdiv">整型（Integer）类型，可选项。</div></td>
      </tr>
	  <tr class="alt-color">
        <td class="jd-typecol"><span class="prettyprint lang-xml">timeSync</span></td>
        <td class="jd-linkcol"><span class="sympad">同步虚拟机时间与主机时间 1:同步，0：不同步 </span>
          <div class="jd-descrdiv">整型（Integer）类型，可选项。</div></td>
      </tr>
	  <tr>
        <td class="jd-typecol"><span class="prettyprint lang-xml">haManage</span></td>
        <td class="jd-linkcol"><span class="sympad">虚拟机HA管理标志 1:开启高可靠性，0：关闭高可靠性。</span>
          <div class="jd-descrdiv">整型（Integer）类型，可选项。</div></td>
      </tr>
  </table> 

<h2><a name="result"></a>返回结果</h2>
<dl>
  <dt><b>状态码</b></dt>
  <dd>
  <ul>
    <li>204(No Content)：成功。</li>
    <li>409(Conflict)：失败。 </li>
  </ul>
  </dd>
  <dt><b>消息头</b></dt>
  <div class="source"><pre class="prettyprint lang-xml">HTTP/1.1 204 No Content<br>Server: Apache-Coyote/1.1<br>Date: Mon, 25 Nov 2013 12:52:27 GMT
  </pre>
  </div>
  <dt><b>消息体</b></dt>
  <div class="source">
    <pre class="prettyprint lang-xml">无</pre>
  </div>
</dl>
<dt>
    <h2><a name="example"></a>应用举例</h2>
    <p>修改虚拟机test基本配置信息。</p>
    <dl>
      <dt><b>请求</b></dt>
      <div class="source">
        <pre class="prettyprint lang-xml">POST http://192.168.0.4:8080/cas/casrs/vm/modify
accept: application/xml


&lt;domain&gt;<br>    &lt;id&gt;6&lt;/id&gt;<br>    &lt;name&gt;test&lt;/name&gt;<br>    &lt;basic&gt;<br>        &lt;pae&gt;0&lt;/pae&gt;<br>        &lt;acpi&gt;0&lt;/acpi&gt;<br>        &lt;apic&gt;0&lt;/apic&gt;<br>        &lt;clock&gt;utc&lt;/clock&gt;<br>        &lt;blkiotune&gt;300&lt;/blkiotune&gt;<br>        &lt;startPriority&gt;0&lt;/startPriority&gt;<br>        &lt;autoMigrate&gt;0&lt;/autoMigrate&gt;<br>        &lt;osha&gt;1&lt;/osha&gt;<br>        &lt;timeSync&gt;1&lt;/timeSync&gt;<br>        &lt;haManage&gt;0&lt;/haManage&gt;<br>        &lt;desc&gt;test rest modify domain&lt;/desc&gt;<br>    &lt;/basic&gt;<br>&lt;/domain&gt;
</pre>
      </div>
      <dt><b>回应</b></dt>
      <div class="source"><pre class="prettyprint lang-xml">HTTP/1.1 204 No Content<br>Server: Apache-Coyote/1.1<br>Date: Mon, 25 Nov 2013 12:52:27 GMT</pre>
      </div>
    </dl>
    
</div>
</div>
</div>
</body>
</html>